package cn.edu.ctbu.simplescoremanagementsystem.service;

import cn.edu.ctbu.simplescoremanagementsystem.domain.Student;
import cn.edu.ctbu.simplescoremanagementsystem.vo.Result;
import org.springframework.data.domain.Example;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface StudentService {
    Result<List<Student>> findAll();
    Result<Student> findById(Integer id);

    Result<Student> insert(Student student);

    Result<Student> update(Student student);

    Result<Student> Delete(Integer id) throws Exception;
    Page<Student> getByPage(Pageable pageable);
    Page<Student> getByPage(Example<Student> student, Pageable pageable);

    List<Student> findByNoAndPassword(String username, String password);

    public Student validateUsernameAndPassword(String username, String password) throws Exception;
}
